﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common
{
    public class Employee 
    {
        public int ID { get; set; }
        //Номер id до якого відноситья (посада, адреса, номер, документ....)відповідні дані
        public string CodeEmployee { get; set; }
        //Табельний номер
        public string Number { get; set; }
        //Прізвище
        public string LastName { get; set; }
        //Ім'я
        public string Name { get; set; }
        //По батькові
        public string Patronymic { get; set; }
        //Дата народження
        public string BirthDate { get; set; }
        //Стать
        public string Gender { get; set; }
        //Номер мобільного телефона
        public string MobNumberPhone { get; set; }
        //Адреса
        public string Adress { get; set; }
        //Посада
        public string Appointment { get; set; }
        //Категорія
        public string CategoryAppointment { get; set; }


        public Dictionary<string, string> DepartmentsFields { get; private set; }
        public Dictionary<string, string> AdressFields { get; private set; }
        public Dictionary<string, string> EmployeeFields { get; private set; }

        public Employee() { }

        public Employee(string codeEmployee, string number, string lastName, string name, string patronymic, string birthDate, string gender, string mobNumberPhone, string adress, string appointment, string categoryappointment)
            : this(0, codeEmployee, number, lastName, name, patronymic, birthDate, gender, mobNumberPhone, adress, appointment, categoryappointment) { }
        public Employee(int id, string codeEmployee, string number, string lastName, string name, string patronymic, string birthDate, string gender, string mobNumberPhone, string adress, string appointment, string categoryappointment) 
        {
            this.ID = id;
            this.CodeEmployee = codeEmployee;
            this.Number = number;
            this.LastName = lastName;
            this.Name = name;
            this.Patronymic = patronymic;
            this.BirthDate = birthDate;
            this.Gender = gender;
            this.MobNumberPhone = mobNumberPhone;
            this.Adress = adress;
            this.Appointment = appointment;
            this.CategoryAppointment = categoryappointment;


            DepartmentsFields = new Dictionary<string, string>(1);
            DepartmentsFields.Add("Appointment", Appointment);

            AdressFields = new Dictionary<string, string>(1);
            AdressFields.Add("Adress", Adress);

            EmployeeFields = new Dictionary<string, string>(9);
            EmployeeFields.Add("CodeEmployee", CodeEmployee);
            EmployeeFields.Add("Number", Number);
            EmployeeFields.Add("LastName", LastName);
            EmployeeFields.Add("Name", Name);
            EmployeeFields.Add("Patronymic", Patronymic);
            EmployeeFields.Add("BirthDate", BirthDate);
            EmployeeFields.Add("Gender", Gender);
            EmployeeFields.Add("MobNumberPhone", MobNumberPhone);
            EmployeeFields.Add("CategoryAppointment", CategoryAppointment);
        }
    }
}
